import type { RouteRecordRaw } from 'vue-router';
import { LOGIN_NAME } from '@/router/constant';

/**
 * layout布局之外的路由
 */
export const LoginRoute: RouteRecordRaw = {
  path: '/login',
  name: LOGIN_NAME,
  component: () => import(/* webpackChunkName: "login" */ '@/views/login/index.vue'),
  meta: {
    title: '登录',
  },
};

export const systemUser: RouteRecordRaw = {
  path: '/system/user',
  name: "systemUser",
  // component: () => import('@/views/system/permission/user/index.vue'),
  component: () => import('@/views/system/component/index.vue'),
  meta: {
    title: '用户管理',
    hideChildrenInMenu:true,
  },
  children:[
    // {
    //   path: '/system/role',
    //   name: "systemRole",
    //   component: () => import("@/views/system/permission/role/index.vue"),
    //   meta: {
    //     title: '权限管理',
    //     hideChildrenInMenu:true,
    //   }
    // },
    // {
    //   path: '/system/menu',
    //   name: "systemMenu",
    //   component: () => import('@/views/system/permission/menu/index.vue'),
    //   meta: {
    //     title: '菜单管理',
    //     hideChildrenInMenu:true,
    //   },
    // }
  ]
}
export const systemRole: RouteRecordRaw = {
  path: '/system/role',
  name: "systemRole",
  component: () => import("@/views/system/permission/role/index.vue"),
  meta: {
    title: '权限管理',
  },
  children: [],
}
export const systemMenu: RouteRecordRaw = {
  path: '/system/menu',
  name: "systemMenu",
  component: () => import('@/views/system/permission/menu/index.vue'),
  meta: {
    title: '菜单管理',
  },
}

export default [
  LoginRoute,systemUser,
  systemRole,systemMenu
];
